home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
4_0
/
EXGRAF3D
/
GRAF3D.H
< prev
next >
Wrap
Text File
|
1990-09-20
|
3KB
|
103 lines
/************************************************************
Created: Tuesday, September 12, 1989 at 7:00 PM
Graf3D.h
C Interface to the Macintosh Libraries
Copyright Apple Computer, Inc. 1985-1989
All rights reserved
************************************************************/
#ifndef __GRAF3D__
#define __GRAF3D__
#ifndef __QUICKDRAW__
#include <Quickdraw.h>
#endif
typedef Fixed XfMatrix[4][4];
struct Point3D {
Fixed x;
Fixed y;
Fixed z;
};
typedef struct Point3D Point3D;
struct Point2D {
Fixed x;
Fixed y;
};
typedef struct Point2D Point2D;
struct Port3D {
GrafPtr grPort;
Rect viewRect;
Fixed xLeft;
Fixed yTop;
Fixed xRight;
Fixed yBottom;
Point3D pen;
Point3D penPrime;
Point3D eye;
Fixed hSize;
Fixed vSize;
Fixed hCenter;
Fixed vCenter;
Fixed xCotan;
Fixed yCotan;
char filler;
char ident;
XfMatrix xForm;
};
typedef struct Port3D Port3D;
typedef Port3D *Port3DPtr, **Port3DHandle;
#ifdef __cplusplus
extern "C" {
#endif
pascal void InitGrf3D(Port3DHandle port);
pascal void Open3DPort(Port3DPtr port);
pascal void SetPort3D(Port3DPtr port);
pascal void GetPort3D(Port3DPtr *port);
pascal void MoveTo2D(Fixed x,Fixed y);
pascal void MoveTo3D(Fixed x,Fixed y,Fixed z);
pascal void LineTo2D(Fixed x,Fixed y);
pascal void Move2D(Fixed dx,Fixed dy);
pascal void Move3D(Fixed dx,Fixed dy,Fixed dz);
pascal void Line2D(Fixed dx,Fixed dy);
pascal void Line3D(Fixed dx,Fixed dy,Fixed dz);
/* Removed 'const' attribute for THC, leg 08/30/90 */
/* pascal void ViewPort(const Rect *r); */
pascal void ViewPort(Rect *r);
pascal void LookAt(Fixed left,Fixed top,Fixed right,Fixed bottom);
pascal void ViewAngle(Fixed angle);
pascal void Identity(void);
pascal void Scale(Fixed xFactor,Fixed yFactor,Fixed zFactor);
pascal void Translate(Fixed dx,Fixed dy,Fixed dz);
pascal void Pitch(Fixed xAngle);
pascal void Yaw(Fixed yAngle);
pascal void Roll(Fixed zAngle);
pascal void Skew(Fixed zAngle);
/* Removed 'const' attribute for THC, leg 08/30/90 */
/* pascal void Transform(const Point3D *src,Point3D *dst); */
pascal void Transform(Point3D *src,Point3D *dst);
/* Removed 'const' attribute for THC, leg 08/30/90 */
/* pascal short Clip3D(const Point3D *src1,const Point3D *src2,Point *dst1,
Point *dst2); */
pascal short Clip3D(Point3D *src1, Point3D *src2,Point *dst1,
Point *dst2);
pascal void SetPt3D(Point3D *pt3D,Fixed x,Fixed y,Fixed z);
pascal void SetPt2D(Point2D *pt2D,Fixed x,Fixed y);
pascal void LineTo3D(Fixed x,Fixed y,Fixed z);
#ifdef __cplusplus
}
#endif
#endif